package com.zzy.mccjt.interfaces.system;

import com.zzy.mccjt.service.common.framework.response.WebApiResponse;
import com.zzy.mccjt.service.common.model.Result;
import com.zzy.pojo.system.login.UserDTO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

@FeignClient(value = "springcloud-app-system", contextId = "MccjtAppSystemLoginInterface")
public interface MccjtAppSystemLoginInterface {

    String MAPPING = "/system/login";

    /**
     * 登陆
     * @param
     * @return
     */
    @PostMapping(value = MAPPING +"/login")
    @ApiOperation(value = "登陆")
    WebApiResponse<String> login(@RequestBody @Valid UserDTO u);

    @GetMapping(value = MAPPING +"/regist")
    @ApiOperation(value = "注册")
    WebApiResponse<String> regist(@RequestBody @Valid UserDTO u);




}